<!DOCTYPE html>
<title>Credential Management API: create() basics.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
  promise_test(async (t) => {
    await promise_rejects_dom(
      t,
      "NotSupportedError",
      navigator.credentials.get()
    );

    await promise_rejects_dom(
      t,
      "NotSupportedError",
      navigator.credentials.get({})
    );

    await promise_rejects_dom(
      t,
      "NotSupportedError",
      navigator.credentials.get({ x: "y" })
    );

    await promise_rejects_dom(
      t,
      "NotSupportedError",
      navigator.credentials.get({ x: "y", y: "z" })
    );

    await promise_rejects_dom(
      t,
      "NotSupportedError",
      navigator.credentials.get({ x: "y" })
    );

    await promise_rejects_dom(
      t,
      "NotSupportedError",
      navigator.credentials.get({ mediation: "required" })
    );

    const abortController = new AbortController();
    const { signal } = abortController;
    await promise_rejects_dom(
      t,
      "NotSupportedError",
      navigator.credentials.get({ signal })
    );

    await promise_rejects_dom(
      t,
      "NotSupportedError",
      navigator.credentials.get({ signal, mediation: "required" })
    );
  }, "Calling navigator.credentials.get() without a valid matching interface.");
</script>
